<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| URI ROUTING
| -------------------------------------------------------------------------
| This file lets you re-map URI requests to specific controller functions.
|
| Typically there is a one-to-one relationship between a URL string
| and its corresponding controller class/method. The segments in a
| URL normally follow this pattern:
|
|	example.com/class/method/id/
|
| In some instances, however, you may want to remap this relationship
| so that a different class/function is called than the one
| corresponding to the URL.
|
| Please see the user guide for complete details:
|
|	http://codeigniter.com/user_guide/general/routing.html
|
| -------------------------------------------------------------------------
| RESERVED ROUTES
| -------------------------------------------------------------------------
|
| There area two reserved routes:
|
|	$route['default_controller'] = 'welcome';
|
| This route indicates which controller class should be loaded if the
| URI contains no data. In the above example, the "welcome" class
| would be loaded.
|
|	$route['404_override'] = 'errors/page_missing';
|
| This route will tell the Router what URI segments to use if those provided
| in the URL cannot be matched to a valid route.
|
*/

$route['default_controller'] = "urban_ui";
$route['404_override'] = '';

/* CMS UI */

$route['login'] = 'urban_ui/login';
$route['logout'] = 'urban_ui/logout';
$route['(users)'] = $route['(groups)'] = $route['(categories)'] = $route['(objects)'] = $route['(objectstruct)'] = $route['(objectdata)'] = $route['(about)'] 
	= 'urban_ui/panel/$1';
$route['objects/(:num)'] = 'urban_ui/panel/objectstruct/$1';
$route['objects/(:num)/entries'] = 'urban_ui/panel/objectentries/$1';
$route['objects/(:num)/entries/(:num)'] = 'urban_ui/panel/objectentry/$1/$2';
$route['objects/(:num)/new'] = 'urban_ui/panel/objectnewentry/$1';

/* API to the CMS */

$route['api'] = 'urban_api';

$route['api/user/insert'] = 'urban_api/user_insert';
$route['api/user/delete/(:num)'] = 'urban_api/user_delete/$1';
$route['api/user/update/(:num)'] = 'urban_api/user_update/$1';

$route['api/object/insert'] = 'urban_api/object_insert';
$route['api/object/delete/(:num)'] = 'urban_api/object_delete/$1';
$route['api/object/update/(:num)'] = 'urban_api/object_update/$1';
$route['api/object/new/(:num)'] = 'urban_api/object_new/$1';

$route['api/field/insert'] = 'urban_api/field_insert';
$route['api/field/delete/(:num)/(:any)'] = 'urban_api/field_delete/$1/$2';
$route['api/field/update'] = 'urban_api/field_update';

$route['api/data/insert/(:num)'] = 'urban_api/data_insert/$1';
$route['api/data/update/(:num)/(:num)'] = 'urban_api/data_update/$1/$2';
$route['api/data/delete/(:num)/(:num)'] = 'urban_api/data_delete/$1/$2';
$route['api/data/published/(:num)/(:num)'] = 'urban_api/data_published/$1/$2';
$route['api/data/tags/(:num)/(:num)'] = 'urban_api/data_tags/$1/$2';
$route['api/data/category/(:num)/(:num)'] = 'urban_api/data_cat/$1/$2';

$route['api/media/upload/(:num)/(:num)'] = 'urban_api/media_upload/$1/$2';
$route['api/media/delete/(:num)'] = 'urban_api/media_delete/$1';
$route['api/media/captions/update/(:num)'] = 'urban_api/media_captions_update/$1';

$route['api/category/insert'] = 'urban_api/cat_insert';
$route['api/category/update/(:num)'] = 'urban_api/cat_update/$1';
$route['api/category/delete/(:num)'] = 'urban_api/cat_delete/$1';

/* End of file routes.php */
/* Location: ./application/config/routes.php */